#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;
char s[100100];
int main()
{
	int n,num1 = 0,num2 = 0;
	int ans;
    scanf("%d",&n);
    scanf(" %s",s);
    for(int i=0;i<n;i++)
    {
        if(i%2)
		{
			if(s[i]!='r')num1++;
		}
        else
		{
			if(s[i]!='b')num2++;
		}
    }
    ans=abs(num1-num2)+min(num1,num2);
    num1=num2=0;
    for(int i=0;i<n;i++)
    {
        if(i%2)
		{
			if(s[i]!='b')num1++;
		}
        else
		{
			if(s[i]!='r')num2++;
		}
    }
    ans=min(ans,abs(num1-num2)+min(num1,num2));
    printf("%d\n",ans);
}
